/*
 * @Description: 
 * @Autor: HuiSir<273250950@qq.com>
 * @Date: 2024-02-26 14:46:17
 * @LastEditTime: 2024-09-04 00:05:38
 */
@keyframes entryanim {
  0% {
    transform: translateX(-100px);
  }
  100% {
    transform: translateX(0);
  }
}
@keyframes comments-form {
  0% {
    opacity: 0;
  }
  100% {
    opacity: 1;
  }
}
@mixin m-a {
  a {
    border-bottom: 1px dotted var(--my-preset-color-active);
    word-break: break-all;
    &:hover {
      text-decoration: unset;
    }
  }
}
#ContentDetail {
  max-width: 800px;
  animation: entryanim 0.4s;
  margin-bottom: 50px;
  margin-top: 30px;
  min-height: calc(100vh - 400px);
}
#Article {
  .entry-header {
    margin-bottom: 40px;
    .entry-meta {
      margin-top: 20px;
      font-size: 13px;
      a {
        margin-right: 10px;
        &.post-edit-link {
          color: var(--my-preset-color-active);
        }
        &:hover {
          text-decoration: unset;
        }
      }
      span.cats{
        margin-right: 10px;
        a{
          margin-right: 0;
        }
      }
    }
  }
  .entry-content {
    // font-family: var(--my-font-family-3);
    p {
      color: var(--my-preset-color-font-1);
      word-wrap: break-word;
      line-height: 2;
      font-size: 18px;
      margin-bottom: 35px;
      &.copyright-link {
        color: var(--my-preset-color-font-gray-1);
      }
      @include m-a;
    }

    h2 {
      margin-top: 60px;
      margin-bottom: 20px;
      padding-bottom: 15px;
      border-bottom: 1px solid #dadada;
      color: var(--my-preset-color-font-3);
      font-size: 28px;
      line-height: 1.1;
    }
    h3 {
      margin-top: 35px;
      margin-bottom: 25px;
      color: var(--my-preset-color-font-3);
      font-size: 24px;
    }
    h4 {
      margin-top: 35px;
      margin-bottom: 25px;
      font-size: 22px;
    }
    img {
      padding: 10px;
      max-width: 100%;
      display: block;
      margin: 0 auto;
      cursor: zoom-in;
    }
    code,
    pre {
      -webkit-border-radius: 4px;
      -moz-border-radius: 4px;
      border-radius: 4px;
      &:not([class*="language-"]){
        white-space: pre-wrap;
        word-wrap: break-word;
        font-family: Monaco, Menlo, Consolas, "Courier New", monospace;
      }
    }
    pre{
      background-color: var(--my-preset-color-bg-3);
      margin: 0 0 30px !important;
      &:not([class*="language-"]) {
        display: block;
        padding: 15px;
        font-size: 14px;
        line-height: 1.6;
        word-break: break-all;
      }
    }
    
    code{
      &:not([class*="language-"]){
        padding: 2px 4px;
        margin: 0 2px;
        background-color: var(--my-preset-color-bg-gray-1);
        color: var(--my-preset-color-active);
        vertical-align: middle;
        font-size: 90%;
      }
      &[class*="language-"] {
        padding: 0 !important;
      }
    }
    blockquote {
      margin: 30px 0;
      padding: 30px 40px;
      -webkit-border-radius: 4px;
      -moz-border-radius: 4px;
      border-radius: 4px;
      background: var(--my-preset-color-bg-gray-1);
      &:before {
        position: absolute;
        margin-left: -30px;
        color: var(--my-preset-color-border-2);
        content: "\201C";
        font-size: 9em;
        font-family: arial;
        line-height: 0.2em;
      }
      p {
        font-size: 16px !important;
        line-height: 30px !important;
        &:last-child {
          margin-bottom: 0;
        }
      }
    }
    &>ol,
    &>ul {
      margin-bottom: 20px;
      padding: 0 2%;
      margin-top: -10px;
      li {
        margin-bottom: 10px;
        font-size: 16px;
        @include m-a;
      }
    }
    &>ul li {
      list-style: square inside;
    }
    &>ol li {
      list-style: decimal inside;
    }
    table {
      border-collapse: collapse;
      margin: 0 auto;
      text-align: center;
      margin-bottom: 30px;
      width: 100%;
      td,
      th {
        border: 1px solid #cad9ea;
        color: var(--my-preset-color-font-gray-1);
        height: 30px;
        text-align: left;
        padding: 0 6px;
      }
      thead th {
        background-color: #cce8eb;
        width: 100px;
      }
      tr {
        &:nth-child(odd) {
          background: #fff;
        }
        &:nth-child(even) {
          background: #f5fafa;
        }
      }
    }
    .wp-caption {
      margin-bottom: 30px;
      padding: 0.6em;
      max-width: 100%;
      border: 1px solid #ddd;
      background: #f3f3f3;
    }
    .wp-caption img[class*="wp-image-"] {
      display: block;
      margin: 0 auto;
    }
    .wp-caption .wp-caption-text {
      color: #878787;
      text-align: center;
      font-size: 15px;
      margin: 0.6em 0 0;
    }
    .gallery-size-thumbnail img {
      padding: 3px;
      width: 95%;
      height: 150px;
      border: 1px solid #ddd !important;
    }
    .wp-video {
      margin-bottom: 40px;
    }
    p a, &>ul li a, &>ol li a {
      border-bottom: 1px dotted #F96B4D;
      word-break: break-all;
      font-family: var(--my-font-family-3);
    }

    #ez-toc-container a {
      color: var(--my-preset-color-font-1);
    }

    hr {
      border: 0;
      height: auto;
      &::before {
        color: var(--my-preset-color-font-gray-1);
        font-size: 1.1em;
        display: block;
        content: "* * *";
        text-align: center;
        margin: 1.5em 0 2em;
      }
    }
  }
  #VArticleSupport {
    margin-top: 40px;
    .support-author {
      padding: 30px 40px 40px 40px;
      -webkit-border-radius: 4px;
      -moz-border-radius: 4px;
      border-radius: 4px;
      background: var(--my-preset-color-bg-gray-1);
      text-align: center;
      p {
        margin-bottom: 20px;
        color: var(--my-preset-color-font-gray-3);
        font-size: 18px;
      }
      .support-button {
        padding: 6px 12px 6px 12px;
        border-color: var(--my-preset-color-active);
        -webkit-border-radius: 4px;
        -moz-border-radius: 4px;
        border-radius: 4px;
        background: var(--my-preset-color-active);
        color: #fff;
        font-size: 14px;
        &:hover {
          border-color: var(--my-preset-color-active-hover);
          background-color: var(--my-preset-color-active-hover);
          color: #fff;
        }
      }
      .sponsor-up {
        position: fixed;
        top: 100px;
        left: 50%;
        z-index: 9999;
        margin-left: -170px;
        padding: 20px;
        width: 340px;
        -webkit-border-radius: 6px;
        -moz-border-radius: 6px;
        border-radius: 6px;
        background: var(--my-preset-color-alert-bg);
        text-align: left;
        box-shadow: 2px 5px 20px 10px rgba(0, 0, 0, .3);
        *{
          user-select: none;
          -webkit-user-select: none;
        }
        h5 {
          margin-bottom: 10px;
          font-weight: 700;
          font-size: 16px;
        }
        label {
          display: inline-block;
          margin-right: 15px;
          cursor: pointer;
        }
        c {
          margin-right: 2px;
          color: var(--my-preset-color-font-gray-1);
          font-size: 16px;
        }
        .ok {
          color: var(--my-preset-color-active);
          position: relative;
          &:before {
            position:absolute;
            font-family: var(--my-font-family-2);
            color: var(--my-preset-color-font-gray-1);
            content: "✔";
            font-weight: 700;
            font-size: 17px;
            left: 2px;
            bottom: 1px;
          }
        }
        dt {
          margin: 20px auto;
          padding: 10px;
          width: 234px;
          height: 234px;
          border-style: solid;
          border-width: 10px;
          -webkit-border-radius: 30px;
          -moz-border-radius: 30px;
          border-radius: 30px;
          line-height: 1.36;
          text-align: center;
          display: flex;
          align-items: center;
          justify-content: center;
          position: relative;
          img{
            width: 200px;
            height: 200px;
          }
          span {
            padding: 0 10px;
            background: var(--my-preset-color-alert-bg);
            font-weight: 700;
            font-size: 13px;
            position: absolute;
            bottom: -14px;
          }
        }
        i.close{
          font-family: var(--my-font-family-2);
          position: absolute;
          top: 0;
          right: 0;
          line-height: 1;
          cursor: pointer;
          padding: 15px;
          font-size: 22px;
        }
      }
    }
    .qr-weixin {
      border-color: #40be30;
      color: #40be30;
    }
    .qr-alipay {
      border-color: #ef741e;
      color: #ef741e;
    }
  }
  #VArticleSocial {
    .post-social {
      display: flex;
      align-items: center;
      & > div {
        display: inline-flex;
        align-items: center;
        border: 1px solid var(--my-preset-color-border-2);
        border-radius: 4px;
        color: var(--my-preset-color-font-gray-1);
        font-size: 14px;
        padding: 2px 10px;
        cursor: pointer;
        &.loading{
          cursor: wait;
        }
        & ~ div {
          margin-left: 10px;
        }
        &:hover, &.active {
          border-color: var(--my-preset-color-active);
          color: var(--my-preset-color-active);
          svg {
            fill: var(--my-preset-color-active);
          }
        }
        span {
          margin-left: 5px;
        }
        svg {
          fill: var(--my-preset-color-font-gray-1);
        }
      }
    }
    .share-up{
      position: fixed;
      width: 240px;
      height: 100px;
      text-align: center;
      top: 30%;
      background: var(--my-preset-color-alert-bg);
      display: flex;
      flex-direction: column;
      left: calc(50% - 120px);
      z-index: 9999;
      box-shadow: 2px 5px 20px 10px rgba(0, 0, 0, .3);
      border-radius: 4px;
      .share-btn{
        display: flex;
        align-items: center;
        justify-content: space-around;
        width: 100%;
        height: 100%;
        padding: 10px 10px 0 10px;
        cursor: pointer;
      }
      .mobile{
        display: none;
        height: 100%;
        padding: 22px 35px;
      }
    }
    .qrcode {
      position: fixed;
      width:230px;
      height:255px;
      top: 15%;
      left: calc(50% - 115px);
      padding-top: 10px;
      border-radius: 4px;
      background: var(--my-preset-color-alert-bg);
      text-align: center;
      line-height: 1;
      box-shadow: 2px 5px 20px 10px rgba(0, 0, 0, .3);
      z-index: 9999;
      h5{
        margin: 5px 0 10px;
        font-size: 16px;
      }
      &::after {
        content: "loading...";
        width: 100%;
        height: 200px;
        position: absolute;
        bottom: 17px;
        left: 0;
        line-height: 200px;
        z-index: 1;
      }
      img{
        position: absolute;
        z-index: 2;
        left: 15px;
        bottom: 13px;
      }
    }
    i.close{
      position: absolute;
      font-family: var(--my-font-family-2);
      top: 0;
      right: 0;
      line-height: 1;
      cursor: pointer;
      padding: 10px;
    }
  }
  .entry-share {
    margin-top: 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    .tags {
      width: calc(100% - 380px);
      text-align: right;
      overflow: hidden;
      height: 32px;
      a {
        display: inline-flex;
        align-items: center;
        border: 1px solid var(--my-preset-color-border-2);
        border-radius: 4px;
        color: var(--my-preset-color-font-gray-1);
        font-size: 14px;
        padding: 2px 10px;
        cursor: pointer;
        margin-bottom: 5px;
        word-break: keep-all;
        &:hover {
          border-color: var(--my-preset-color-active);
          color: var(--my-preset-color-active);
        }
        & ~ a {
          margin-left: 10px;
        }
      }
    }
  }
  .pager {
    margin: 40px 0;
    display: flex;
    justify-content: space-between;
    li {
      display: inline-flex;
      width: calc(50% - 20px);
      flex-direction: column;
      span{
        color: var(--my-preset-color-font-gray-1);
      }
      a{
        overflow: hidden;
        white-space: nowrap;
        text-overflow: ellipsis;
        color:var(--my-preset-color-font-gray-3);
      }
      &.previous {
        margin-right: 35px;
        text-align: left;
      }
      &.nextpost {
        text-align: right;
      }
    }
  }
}

#imgLook {
  position: fixed;
  top: 0;
  z-index: 9999;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  img{
    max-width: 100%;
    max-height: 100%;
  }
}

#VComments {
  margin-top: 40px;
  .comment-form {
    margin-top: 20px;
    .user-info {
      position: relative;
      display: flex;
      justify-content: space-between;
      margin-bottom: -60px;
      transition: 0.5s margin;
      z-index: 0;
      &.show {
        margin-bottom: unset;
      }
      li {
        list-style: none;
        position: relative;
        &.author,
        &.email {
          width: calc(30% - 7px);
        }
        &.url {
          width: calc(40% - 7px);
        }
        input {
          width: 100%;
          padding: 7px 10px 5px 10px;
          border: 1px solid var(--my-preset-color-border-1);
          border-radius: 4px;
          outline: 0;
          overflow: hidden;
          font-size: 13px;
          color: #4f4f4f;
          line-height: 21px;
          background: var(--my-preset-color-bg-1);
          color: var(--my-preset-color-font-1);        
          &::placeholder {
            color: var(--my-preset-color-font-gray-1);
            font-family: "Microsoft Yahei", "微软雅黑", sans-serif !important;
          }
        }
        label {
          position: absolute;
          margin-left: 6px;
          background: var(--my-preset-color-bg-1);
          padding: 0 4px;
          color: var(--my-preset-color-font-gray-3);
          font-size: 12px;
          top: -7px;
          line-height: 1;
        }
      }
    }
    .content-box {
      position: relative;
      margin-top: 10px;
      z-index: 1;
      line-height: 1;
      textarea {
        width: 100%;
        min-height: 100px;
        padding: 10px;
        border: 1px solid var(--my-preset-color-border-1);
        border-radius: 4px;
        outline: 0;
        overflow: hidden;
        resize: none;
        background: var(--my-preset-color-bg-1);
        font-size: 13px;
        line-height: 22px;
        color: var(--my-preset-color-font-1);
        &::placeholder {
          color: var(--my-preset-color-font-gray-1);
          font-family: "Microsoft Yahei", "微软雅黑", sans-serif !important;
        }
      }
    }
    .buttons {
      display: flex;
      justify-content: space-between;
      margin-top: 9px;
      .smilies {
        margin-top: -4px;
        cursor: pointer;
        position: relative;
        svg > path {
          transition: all 0.3s ease-in-out;
        }
        &:hover svg > path {
          fill: var(--my-preset-color-active);
        }
        .smilies-down {
          position: absolute;
          left: 0;
          top: 35px;
          width: 288px;
          background: var(--my-preset-color-alert-bg);
          border-radius: 3px;
          box-shadow: 0 0 0 1px rgb(0 0 0 / 9%),
            2px 2px 12px 0px rgb(0 0 0 / 21%);
          transition: all 300ms;
          overflow: hidden;
          height: 128px;
          padding: 8px;
          transform: scale(0);
          transform-origin: left top;
          z-index: 1;
          display: flex;
          flex-wrap: wrap;
          &.show {
            transform: scale(1);
          }
          img {
            width: 30px;
            height: auto;
            cursor: pointer;
            display: inline-block;
            margin: 4px;
          }
        }
      }
      button {
        outline: none;
        width: 100px;
        font-size: 13px;
        background: var(--my-preset-color-button-bg-1);
        color: var(--my-preset-color-button-font-1);
        border: 1px solid var(--my-preset-color-border-1);
        cursor: pointer;
        border-radius: 40px;
        height: 30px;
        margin-left: 10px;
        &:hover,
        &[disabled] {
          border-color: var(--my-preset-color-active);
          color: #fff;
          background: var(--my-preset-color-button-bg-active);
        }
        &[disabled] {
          cursor: not-allowed;
        }
      }
    }
  }
  &>ul.comment-list {
    margin-top: 25px;
    font-size: 14px;
    line-height: 20px;
    border-top: 1px dashed var(--my-preset-color-border-3);
    li.comment-item {
      position: relative;
      border-bottom: 1px dashed var(--my-preset-color-border-3);
      padding: 25px 0;
      list-style: none;
      line-height: 1;
      &.last {
        border-bottom: none;
      }
      .avatar {
        display: inline-block;
        position: absolute;
        left: 0;
        width: 40px;
        height: 40px;
        img {
          width: 100%;
          height: 100%;
          box-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
          border-radius: 100px;
          transition: transform 500ms;
        }
      }
      &:hover {
        &>.avatar img {
          transform: rotate(360deg);
        }
      }
      .data {
        width: calc(100% - 55px);
        min-height: 40px;
        margin-left: 55px;
        position: relative;
        transition: 0.5s all;
        &.reply {
          padding-bottom: 205px;
        }
        .user {
          display: flex;
          justify-content: space-between;
          margin-bottom: 8px;
          span {
            color: var(--my-preset-color-font-gray-1);
            margin-right: 10px;
            &.name {
              color: var(--my-preset-color-active);
            }
            &.reply {
              color: var(--my-preset-color-active);
              cursor: pointer;
              &:hover {
                color: var(--my-preset-color-active-hover);
              }
            }
          }
        }
        .content {
          line-height: 1.5;
          img {
            display: inline-block;
            &.smiley-img {
              height: auto;
              width: 24px;
            }
          }
        }
        .comment-form {
          position: absolute;
          width: 100%;
          animation: comments-form 0.5s;
        }
      }
      ul.comment-list{
        margin-left: 50px;
        margin-top: 25px;
        li.comment-item{
          border-top: 1px dashed var(--my-preset-color-border-3);
          &:last-child{
            border-bottom: none;
            padding-bottom: 0;
          }
        }
      }
    }
  }
  .comment-nav {
    text-align: center;
    margin-top: 30px;
    button {
      padding: 7px 0;
      border: 1px #ddd solid;
      border-radius: 40px;
      color: var(--my-preset-color-button-font-1);
      outline: none;
      background: var(--my-preset-color-button-bg-1);
      display: inline-block;
      cursor: pointer;
      width: 130px;
      &:hover,
      &[disabled] {
        border-color: var(--my-preset-color-active);
        color: #fff;
        background: var(--my-preset-color-button-bg-active);
      }
      &[disabled] {
        cursor: not-allowed;
      }
    }
  }
}

// 适配
@media (max-width: 639px){
  #Article{
    .entry-header{
      margin-bottom: 22px;
    }
    .entry-content{
      p{
        font-size: 15px;
        margin-bottom: 22px;
      }
      blockquote p {
        font-size: 14px !important;
        line-height: 2 !important;
      }
    }
    .entry-share{
      .tags{
        display: none;
      }
    }
    #VArticleSupport{
      margin-top: 30px;
      .support-author{
        padding: 25px 30px 30px 30px;
        p{
          font-size: 15px;
        }
      }
    }
    .entry-share{
      margin-top: 30px;
    }
    #VArticleSocial{
      .post-social>div{
        font-size: 12px;
        padding: 2px 8px;
      }
    }
    .pager {
      margin: 30px 0;
      li span,li a {
          font-size: 13px;
      }
    }
  }
  #VComments {
    &>ul.comment-list li.comment-item ul.comment-list{
      margin-left: unset;
    }
    .comment-form .user-info{
      li.author {
        width: calc(45% - 5px);
      }
      li.email {
        width: calc(55% - 5px);
      }
      li.url{
        display: none;
      }
    }
  }
}

@media (max-width: 479px){
  #Article{
    #VArticleSocial{
      .share-up{
        .mobile{
          display: block;
        }
        .share-btn{
          display: none;
        }
      }
    }
  }
}
